<%--
  Created by IntelliJ IDEA.
  User: 但何非
  Date: 2022/12/13
  Time: 20:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>用戶消息信息</title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="../../static/lib/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../static/css/admin.css" media="all" />
</head>
<body>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
    <legend>查询条件</legend>
</fieldset>

<div class="layui-form">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">用戶id</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="sysId">
            </div>
        </div>
        <button type="button" class="layui-btn layui-btn-normal" onclick="query();">查询</button>
    </div>

</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>信息</legend>
</fieldset>

<div class="layui-form">
    <p style="margin-left:20px" id="mesInfo"</p>
</div>

<%@ include file="/WEB-INF/view/common/includ-js.jsp" %>
<!-- Data Tables -->
<script src="${path}/static/Hui/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="${path}/static/Hui/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="${path}/static/plugins/layui/layui.all.js"></script>
<script>
    function staticsInfo(sysId){
        $.ajax({
            type:"post",
            url:"${path}/redis/message/info",
            dataType:"json",
            data: {sysId:sysId},
            success:function(data){
                if(data.code == 0){
                    if(data.data==''){
                        layer.alert("未有消息", {icon: 1});
                    }else{
                        $("#mesInfo").html(data.data);
                    }

                }else{
                    layer.alert(data.msg, {icon: 2});
                }
            }
        });
    }

    function query(){
        staticsInfo($("#sysId").val());
    }
</script>
</body>
</html>
